package com.yxinsur.imc.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxinsur.imc.common.annotation.Excel;
import com.yxinsur.imc.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 系统生成的手续费详情对象 imc_recn_details
 *
 * @author imc
 * @date 2021-05-13
 */

@Data
@EqualsAndHashCode(callSuper = false)
public class ImcRecnDetails extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    @Excel(name = "手续费表主键")
    private Long recnId;

    @Excel(name = "保单表主键")
    private Long orderId;

    @Excel(name = "保单险种详情主键")
    private Long orderRiskId;

    @Excel(name = "协议的费用科目id")
    private Long contractExpenseId;

    @Excel(name = "保单号，合同号")
    private String policyCode;

    @ApiModelProperty("险种主键")
    private Long repoInsId;

    @Excel(name = "险种代码")
    private String insCode;

    @Excel(name = "险种名称")
    private String riskName;

    @Excel(name = "保单缴费次数，首次为1")
    private Long payNum;

    @Excel(name = "缴费期限")
    private String chargePeriodValue;

    /**
     * 缴费频率类型
     */
    @Excel(name = "缴费频率类型")
    private String chargeIntervalEnum;

    /**
     * 领取年龄
     */
    @Excel(name = "领取年龄")
    private Long pensionAge;

    /**
     * 投保单号
     */
    @Excel(name = "投保单号")
    private String proposalCode;

    /**
     * 当前保单服务人员
     */
    @Excel(name = "当前保单服务人员")
    private Long brokerId;

    /**
     * 原始保单代理人
     */
    @Excel(name = "原始保单代理人")
    private Long initBrokerId;

    /**
     * 保险公司 供应商id
     */
    @Excel(name = "供应商id ")
    private Long supplierId;

    /**
     * 录单机构id（并非租户机构id）
     */
    @Excel(name = "录单机构id", readConverterExp = "并=非租户机构id")
    private Long inputOrgId;

    /**
     * 保单主状态
     */
    @Excel(name = "保单主状态")
    private String orderStatusCode;


    /**
     * 保单总保费
     */
    @Excel(name = "保单总保费")
    private BigDecimal firstPrem;

    /**
     * 保单总标准保费
     */
    @Excel(name = "保单总标准保费")
    private BigDecimal standPrem;

    @Excel(name = "费用计算规则[默认Null和空为fee=prem*fee_rate]保费乘以费用科目对应的费率")
    private String feeCalcRule;

    @Excel(name = "险种保费")
    private BigDecimal prem;

    @Excel(name = "费用科目手续费率")
    private BigDecimal feeRate;

    @Excel(name = "费用科目手续费")
    private BigDecimal fee;

    @Excel(name = "供应商折标")
    private BigDecimal supplierStandRate;

    @Excel(name = "年期折算系数")
    private BigDecimal yearScale;

    @Excel(name = "手续费结算月YYYY-MM")
    private String settleMonth;

    @Excel(name = "结算日期(上传的日期)")
    private Date settleDate;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "投保日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyDate;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "撤单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date cancelDate;

    @Excel(name = "保障期限类型")
    private String coveragePeriodEnum;

    @Excel(name = "保障期限")
    private String coveragePeriodValue;

    @Excel(name = "供应商上传手续费表的主键")
    private Long recnSupplierDetailsId;

    /**
     * 核对结果LS短账 SL长账 L_SUCCESS平账（注账目保费金额相等为平账，并非手续费金额相等为平账）
     */
    @Excel(name = "核对结果LS短账 SL长账 L_SUCCESS平账（注账目保费金额相等为平账，并非手续费金额相等为平账）")
    private String recnCheckResult;
    /**
     * 手续费处理结果A以供应商为准B以系统为准C
     * 忽略不处理
     */
    @Excel(name = "手续费处理结果")
    private String recnHandlingResult;
    /**
     * 手手续费是Y Nsys_yes_no字典
     */
    @Excel(name = "手续费是Y Nsys_yes_no字典")
    private String isFeeEq;

    /**
     * 撤单原因
     */
    @Excel(name = "撤单原因")
    private String cancelCauseNote;

    /**
     * 险种方案外键
     */
    @Excel(name = "险种方案外键")
    private Long insSchemeId;

    /**
     * 承保日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "承保日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date insureDate;

    /**
     * 保单生效日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保单生效日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date effectiveDate;

    /**
     * 保单失效日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保单失效日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expiredDate;

    /**
     * 客户回执签收时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "客户回执签收时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date custAckDate;

    /**
     * 保单终止日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保单终止日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endDate;

    /**
     * 保单所在年度
     */
    @Excel(name = "保单所在年度")
    private Long policyYear;

    /**
     * 保单终止原因
     */
    @Excel(name = "保单终止原因")
    private String endCauseNote;
    /**
     * 因子1
     */
    @Excel(name = "因子1")
    private String factor1Value;
    /**
     * 因子2
     */
    @Excel(name = "因子2")
    private String factor2Value;
    /**
     * 因子3
     */
    @Excel(name = "因子3")
    private String factor3Value;

    /**
     * 删除标记
     */
    @Excel(name = "删除标记")
    private String isDeleted;

    /**
     * 创建人id
     */
    @Excel(name = "创建人id")
    private String createId;

    /**
     * 修改人id
     */
    @Excel(name = "修改人id")
    private String updateId;
    /**
     * 租户id,一个租户id唯一对一个机构id（默认机构id为根节点id暨法人机构）
     */
    @Excel(name = "租户id,一个租户id唯一对一个机构id", readConverterExp = "默=认机构id为根节点id暨法人机构")
    private Long tenantId;
}
